<?php
/**
 * Note: 渠道
 * Date: 2021/05/18
 */
namespace App\Models\Game\Center;

use App\Traits\ModelTrait;

class AppSource extends Base
{
    use ModelTrait;

    public const TYPE_NORMAL = 0; // 默认类型
    public const TYPE_STORE = 1; // 应用商店
    public const TYPE_RECOMMEND = 2; // 推荐分享
    public const TYPE_PUT_IN = 3; // 投放渠道
    public const TYPE_TRY_PLAY = 4; // 试玩站渠道
    public const TYPE_DOUYIN = 5;// 抖音
    public const TYPE_KUAISHOU = 6;// 快手
    public const TYPE_SIGMOB = 7;// Sigmob
    public const TYPE_HONOR = 8; // 荣耀
    public const TYPE_BAIDU = 9;// 百度
    public const TYPE_GUANG_DIAN_TONG = 10;// 广点通
    public const TYPE_UC = 11;// UC

    public const OS_ANDROID = 0;
    public const OS_IOS = 1;

    public $fillable = [
        'id',
        'name',
        'desc',
        'type',
        'os',
        'status',
        'register',
        'audit',
        'data_report',
        'app_source_config_id',
    ];

    /**
     * 关联 渠道方案配置
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function config()
    {
        return $this->belongsTo(\App\Models\Game\Center\AppSourceConfig::class, 'app_source_config_id');
    }
}
